/**
 * 视频点赞相关接口
 */
import request from '@/config/request'

/**
 * 获取视频点赞数量
 */
export const getLikeCount = (videoId: number) => {
  return request.get({ url: '/platform/video/like/getLikeCount', params: { videoId } })
}

/**
 * 获取用户视频点赞状态
 */
export const getLikeStatus = (videoId: number) => {
  return request.get({ url: '/platform/video/like/getLikeStatus', params: { videoId } })
}

/**
 * 点赞视频
 */
export const saveLike = (videoId: number) => {
  return request.post({ url: '/platform/video/like/saveLike', params: { videoId } })
}

/**
 * 取消点赞
 */
export const cancelLike = (videoId: number) => {
  return request.delete({ url: '/platform/video/like/cancelLike', params: { videoId } })
}
